package com.example.actordemo1.stream;

import akka.Done;
import akka.NotUsed;
import akka.actor.ActorSystem;
import akka.stream.ActorMaterializer;
import akka.stream.IOResult;
import akka.stream.javadsl.FileIO;
import akka.stream.javadsl.Source;
import akka.util.ByteString;

import java.math.BigInteger;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.concurrent.CompletionStage;

public class StreamActor {

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("QuickStart");
        Source<Integer, NotUsed> range = Source.range(1, 5);
//        CompletionStage<Done> done = range.runForeach(i -> System.out.println(i), system);
//        done.thenRun(()->system.terminate());

    }
}
